﻿using Core.Event;
using Game.UI;
using UnityEngine;

namespace Game {
    /// <summary>
    /// 交易组件
    /// </summary>
    public class NPCTradeComponent : NPCComponent{
        public int Money {
            get => mMoney;
        }
        [SerializeField] private int mMoney;
        
        public uint ConfigID {
            get => mConfigID;
        }
        [SerializeField] uint mConfigID;

        /// <summary>
        /// 开启商店
        /// </summary>
        public void OpenShop() {
            UIMgr.Ins.OpenWindow<ShopWindow>(PlayerManager.Ins.CurPlayer.TradeModule,Display.NPC.Get<NPCTradeModule>());
        }
    }
}